#ifndef __APP_VP_FINDER
#define __APP_VP_FINDER



#include "ofMain.h"
#include "ofxOpenCv.h"
#include "cv.h"
#include "ofxDirList.h"

#include "abliefern/VanishingPoint.h"
#include "abliefern/Segment.h"
#include "abliefern/Point2f.h"
#include "abliefern/VanishingPointOracle.h"
#include "abliefern/Databaser.h"

#include <vector>
#include <algorithm>



class AppVPFinder : public ofBaseApp{
	
public:
	
	void setup();
	void update();
	void draw();
	
	void keyPressed  (int key);
	void keyReleased(int key);
	void mouseMoved(int x, int y );
	void mouseDragged(int x, int y, int button);
	void mousePressed(int x, int y, int button);
	void mouseReleased(int x, int y, int button);
	void resized(int w, int h);
	

	

		
	//bool compareVP(abliefern::VanishingPoint* the1, abliefern::VanishingPoint* the2);
	
	
	
private:
		

	
	/* Directory listing */
	int 		nImages;
	ofxDirList   DIR;
	int _myImageCounter;
	
	
	abliefern::VanishingPointOracle* _myOracle;
	bool _myWeAreDone;
	
	
	int _myEnterCount;
	
	abliefern::Databaser _myDatabaser;
	
	
	
	
};

#endif
